package myStudent

import org.springframework.cloud.contract.spec.Contract
import org.springframework.cloud.contract.spec.internal.MatchingTypeValue

import java.lang.reflect.Type

Contract.make {
    request {
        method 'GET'
        url value(consumer(regex('/api/v2/myStudents/programs/\\d+/assignments/\\d+/students')),
                producer('/api/v2/myStudents/programs/1/assignments/1/students'))
        headers {
            contentType(applicationJsonUtf8())
            header("id", 1)
        }
    }
    response {
        status 200
    }
}